package com.c2soft.nepalcmx.services;



import java.text.ParseException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.c2soft.nepalcmx.command.ConfirmTradeCommand;
import com.c2soft.nepalcmx.command.TradeBookCommand;
import com.c2soft.nepalcmx.command.TradeBookCommand;

import com.c2soft.nepalcmx.dao.TradeBookDAO;



@Service
public class TradeBookService {

	@Autowired
	private TradeBookDAO tradeBookDAO;
	

	public List<TradeBookCommand> getTradeBookEntriesForUser(String userId) {
		
		return tradeBookDAO.findAllTradeBookEntries(userId);
	}
	
public List<TradeBookCommand> getTradeBookEntriesForBroker(String brokerId) {
		
		return tradeBookDAO.findAllTradeBooksEntries(brokerId);
	}

public List<TradeBookCommand> getTradeBookEntriesForUsers1() {
	
	return tradeBookDAO.findAllTradeBooksEntries1();
}

public List<TradeBookCommand> getPrevTradeBookEntriesForUser(String userId) {
	
	return tradeBookDAO.findPrevTradeBookEntries(userId);
}

public List<TradeBookCommand> getPrevTradeBookEntriesForBrokers(String brokerId) {
	
	return tradeBookDAO.findPrevTradeBooksEntries(brokerId);
}

public List<TradeBookCommand> getPrevTradeBookEntriesForUsers1() {

return tradeBookDAO.findPrevTradeBooksEntries1();
}

public List<TradeBookCommand> getTradeBookEntries(String userId,ConfirmTradeCommand confirmTrade) throws ParseException {
	
	return tradeBookDAO.findAllTradeBooks(userId,confirmTrade);
}
}
